package com.heima.comment.pojos;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.mongodb.core.mapping.Document;

import javax.validation.constraints.NotBlank;
import java.util.Date;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("保存评论的实体类")
@Document("ap_comments")
public class CommentSave {

    /**
     * 主键id
     */
    private String id;


    /**
     * 评论人id
     */
    private Integer authorId;

    /**
     * 评论人
     */
    private String authorName;

    @ApiModelProperty("文章Id")
    @NotBlank(message = "文章Id不能为空")
    private Long entryId;

    @ApiModelProperty("评论内容")
    private String content;

    /**
     * 点赞数
     */
    private Integer likes;
    /**
     * 回复数
     */
    private Integer reply;
    /**
     * 不晓得是啥
     */
    private Integer flag;

    /**
     * 创建时间
     */
    private Date createdTime;

    private Integer channelId;
    private int type;
    private String image;

    private Double longitude;
    private Double latitude;
    private String address;
    private Integer ord;

    private Date updatedTime;

}
